From 744a0b3758d8f841920d39b8318e1edd0aaeae6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Wed, 15 Oct 2025 18:50:11 +0200 Subject: [PATCH] luci-mod-network: organize "logging" tab in dhcp/dns views MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sort the options in the "logging" tab so that they are all grouped together in the order they appear in the UI and delete ones that are specific to DNS from dhcp.js and vice versa. Note that this means that the "logfacility" option is present in both views, since it controls the general logfacility of dnsmasq, both for DNS and DHCP. We might consider adding a help text blurb explaining that, but I've intentionally not changed any code in these patches. Signed-off-by: David Härdeman --- .../resources/view/network/dhcp.js | 19 ++++++++----------- .../luci-static/resources/view/network/dns.js | 13 ++----------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 4f915c2661..d07bc8c102 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -442,11 +442,7 @@ return view.extend({ o.nocreate = true; // End devices - o = s.taboption('logging', form.Flag, 'logqueries', - _('Log queries'), - _('Write received DNS queries to syslog.') + ' ' + _('Dump cache on SIGUSR1, include requesting IP.')); - o.optional = true; - + // Begin logging o = s.taboption('logging', form.Flag, 'logdhcp', _('Extra DHCP logging'), _('Log all options sent to DHCP clients and the tags used to determine them.')); @@ -475,6 +471,13 @@ return view.extend({ o.value('LOCAL7'); o.value('-', _('stderr')); + o = s.taboption('logging', form.Flag, 'quietdhcp', + _('Suppress logging'), + _('Suppress logging of the routine operation for the DHCP protocol.')); + o.optional = true; + o.depends('logdhcp', '0'); + // End logging + o = s.taboption('relay', form.SectionValue, '__relays__', form.TableSection, 'relay', null, _('Relay DHCP requests elsewhere. OK: v4↔v4, v6↔v6. Not OK: v4↔v6, v6↔v4.') + '
' + _('Note: you may also need a DHCP Proxy (currently unavailable) when specifying a non-standard Relay To port(addr#port).') @@ -585,12 +588,6 @@ return view.extend({ o.optional = true; o.placeholder = '/etc/dnsmasq.hosts'; - o = s.taboption('logging', form.Flag, 'quietdhcp', - _('Suppress logging'), - _('Suppress logging of the routine operation for the DHCP protocol.')); - o.optional = true; - o.depends('logdhcp', '0'); - o = s.taboption('pxe_tftp', form.Flag, 'enable_tftp', _('Enable TFTP server'), _('Enable the built-in single-instance TFTP server.')); diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js index 659a8242f7..97523262fd 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js @@ -954,16 +954,12 @@ return view.extend({ o.placeholder = 3600; // End limits + // Being logging o = s.taboption('logging', form.Flag, 'logqueries', _('Log queries'), _('Write received DNS queries to syslog.') + ' ' + _('Dump cache on SIGUSR1, include requesting IP.')); o.optional = true; - o = s.taboption('logging', form.Flag, 'logdhcp', - _('Extra DHCP logging'), - _('Log all options sent to DHCP clients and the tags used to determine them.')); - o.optional = true; - o = s.taboption('logging', form.Value, 'logfacility', _('Log facility'), _('Set log class/facility for syslog entries.')); @@ -986,6 +982,7 @@ return view.extend({ o.value('LOCAL6'); o.value('LOCAL7'); o.value('-', _('stderr')); + // End logging o = s.taboption('relay', form.SectionValue, '__relays__', form.TableSection, 'relay', null, _('Relay DHCP requests elsewhere. OK: v4↔v4, v6↔v6. Not OK: v4↔v6, v6↔v4.') @@ -1097,12 +1094,6 @@ return view.extend({ o.optional = true; o.placeholder = '/etc/dnsmasq.hosts'; - o = s.taboption('logging', form.Flag, 'quietdhcp', - _('Suppress logging'), - _('Suppress logging of the routine operation for the DHCP protocol.')); - o.optional = true; - o.depends('logdhcp', '0'); - o = s.taboption('pxe_tftp', form.Flag, 'enable_tftp', _('Enable TFTP server'), _('Enable the built-in single-instance TFTP server.')); -- 2.30.2